Skip to content

Instantly share code, notes, and snippets.

@turtlemonvh
turtlemonvh / README.md
Created April 7, 2022 22:49
bookmark_file_parser

Scripts and functions for handling parsing of bookmark files into more friendly formats.

From some work I was doing in parsing bookmarks back in ~2016, for deduplication and finding similar bookmarks in a collection of 30K+ bookmarks I have accumulated over 15+ years.

The goal was to make this approx constant memory so parsing can happen quickly in very resource constrained environments. Hence the custom streaming XML and JSON parsing.

Now that tools like browser-history exist I'll likely revisit this project in the next couple years since I'll be able to make a lot of progress in just a few hours. At that time I'll likely convert all this into a more public repository.

Import

@eigengrau
eigengrau / firefox-to-org.py
Last active May 11, 2024 16:48
Export Firefox bookmarks to org-mode
#!/usr/bin/env python
# Read a Mozilla places JSON-structure from STDIN and create a directory
# hierarchy of org-mode files containing bookmarks.
# Copyright (c) 2014 Alexey Kutepov a.k.a. rexim
# Copyright (c) 2016 Sebastian Reuße
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
@edokeh
edokeh / index.js
Last active May 11, 2024 16:46
佛祖保佑,永无 BUG
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \
@alvarotrigo
alvarotrigo / ssp.class.php
Created June 25, 2019 00:14
Modified ssp.class.php file to deal with multiple tables query
<?php
/*
* Helper functions for building a DataTables server-side processing SQL query
*
* The static functions in this class are just helper functions to help build
* the SQL used in the DataTables demo server-side processing scripts. These
* functions obviously do not represent all that can be done with server-side
* processing, they are intentionally simple to show how it works. More complex
* server-side processing operations will likely require a custom script.
@kalaspuffar
kalaspuffar / stable-diffusion-docker.md
Created July 17, 2023 13:28
stable-diffusion-docker.md
@alivarzeshi
alivarzeshi / Standardize_Arabic_Characters.sql
Last active May 11, 2024 16:41
The code updates textual columns in a SQL Server database to standardize specific Arabic characters across all tables.
USE [SQLdmRepository];
GO
-- Declare variables to store the names of the table and column currently being processed.
DECLARE @TableName NVARCHAR(MAX);
DECLARE @ColumnName NVARCHAR(MAX);
-- Declare a cursor to iterate over all textual columns in the database.
-- This cursor selects the name of the table and column from the system catalog views.
-- Only user tables (xtype = 'U') and specific textual column types are considered.

Exploiting Lua 5.1 on x86_64

The following Lua program generates a Lua bytecode program called lua-sandbox-rce.luac, which in turn spawns a shell from within Lua 5.1 sandbox. The remainder of this document attempts to explain how this program works by a whirlwind tour of relevent bits of the Lua 5.1 virtual machine.

function outer()
  local magic -- In bytecode, the stack slot corresponding to this local is changed
  local function middle()
    local co, upval
    local ub1 = {[0] = -- Convert uint8_t to char[1]
@martasskv5
martasskv5 / CompleteDiscordQuest.md
Created April 26, 2024 16:37 — forked from aamiaa/CompleteDiscordQuest.md
Complete Recent Discord Quest

Complete Recent Discord Quest

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
  2. Join a vc
  3. Stream any window (can be notepad or something)
  4. Press Ctrl+Shift+I to open DevTools
  5. Go to the Console tab
  6. Paste the following code and hit enter:
let wpRequire;
@bmaupin
bmaupin / free-database-hosting.md
Last active May 11, 2024 16:40
Free database hosting